package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 库位表
 * </p>
 *
 * @author long
 * @since 2024-11-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_storage_location")
public class StorageLocationDo extends Model<StorageLocationDo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "wh_id", fill = FieldFill.INSERT)
    private Long whId;

    @TableField(value = "tenant_id", fill = FieldFill.INSERT)
    private Long tenantId;

    /**
     * 库位编码
     */
    @TableField("code")
    private String code;

    /**
     * 库位类型
     */
    @TableField("type")
    private Integer type;

    /**
     * 库区id
     */
    @TableField("area_id")
    private Long areaId;

    /**
     * 是否空库位
     */
    @TableField("empty_location_flag")
    private Boolean emptyLocationFlag;

    /**
     * 拣货单库位优先级
     */
    @TableField("picking_location_sort")
    private Integer pickingLocationSort;

    /**
     * 拣货推荐优先级
     */
    @TableField("picking_recommend_sort")
    private Integer pickingRecommendSort;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
